package com.woniuxy.controller;

import com.woniuxy.entity.Storage;
import com.woniuxy.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@RestController
@RequestMapping("storage")
public class StorageController {
    @Autowired
    private StorageService storageService;
    @PostMapping("/deduct")
    public ResponseEntity<String> deduct(@RequestBody List<Storage> itemsList) {
        this.storageService.update(itemsList);
        return ResponseEntity.ok("成功");
    }
    @GetMapping("/get")
    public String get(){
        return "测试";
    }
}
